Suggesting resources using context hashing

ABSTRACT

A first user and a second user may exchange messages during a session and the exchanged messages may be processed to suggest resources to the first user. For example, the first user may be a customer service representative assisting a customer, and the suggested resources may include text of a message to send to the customer. The resources may be suggested by computing a semantic representation of the messages in the session, computing a context vector that describes a context of the session, computing a context hash vector from the context vector, and retrieving one or more resources from a data store of resources using the context hash vector. Information about a resource may be presented to the first user to assist the first user in responding to the second user.

FIELD OF THE INVENTION

The present invention relates to assisting communications using semanticprocessing.

BACKGROUND

Companies need to efficiently interact with customers to provideservices to their customers. For example, customers may need to obtaininformation about services of the company, may have a question aboutbilling, or may need technical support from the company. Companiesinteract with customers in a variety of different ways. Companies mayhave a website and the customer may navigate the website to performvarious actions. Companies may have an application (“app”) that runs ona user device, such as a smart phone or a tablet, that provides similarservices as a website. Companies may have a phone number that customerscan call to obtain information via interactive voice response or tospeak with a customer service representative. Companies may also respondto customers using various social media services, such as Facebook orTwitter.

Some existing techniques for allowing customers to interact withcompanies may be a nuisance to the customer. Navigating to the rightpage on a website or an app or navigating a voice menu on a phone callmay be time consuming. Some existing techniques for allowing customersto interact with companies may be expensive for a company to implement.Hiring customer service representatives to manually respond to requestsand answer phone calls may be a significant expense. For at least thesereasons, customer support facilities may not currently satisfy customerneeds or may be expensive for the company to operate. Therefore,techniques for improving company interactions with customers is needed.

BRIEF DESCRIPTION OF THE FIGURES

The invention and the following detailed description of certainembodiments thereof may be understood by reference to the followingfigures:

FIG. 1 is an example system for suggesting resources to a customerservice representative for responding to a customer.

FIG. 2 is an example of a user interface for a customer servicerepresentative for responding to a customer.

FIG. 3 is a flowchart of an example implementation of suggesting aresource to a customer service representative using a context of asession.

FIG. 4 is an example of data that may be used to train models forsuggesting resources.

FIG. 5 is an example system for training a model for suggestingresources.

FIG. 6 is an example system for suggesting a resource using a context ofa session.

FIGS. 7A and 7B are example systems for training a model for suggestingresources.

FIGS. 8A, 8B, and 8C are example systems for training a model forsuggesting resources using hash vectors.

FIGS. 9A and 9B are example systems for suggesting a resource using hashvectors.

FIG. 10 is a flowchart for an example implementation of training a modelfor suggesting resources using hash vectors.

FIG. 11 is a flowchart of an example implementation of suggesting aresource using hash vectors.

FIG. 12 is an exemplary computing device that may be used to suggestresources and train models for suggesting resources.

DETAILED DESCRIPTION

Described herein are techniques for suggesting resources based on acontext of interactions between two entities. Although the techniquesdescribed herein may be used for a wide variety of entities andinteractions, for clarity of presentation, an example of a customerservice representative of a company providing a response to a request ofa customer will be used. The techniques described herein, however, arenot limited to customers and companies, responses may be provided torequests from users who are not customers, and responses may be from anentity that is not a company, such as an individual. For instance, theinteractions may be between an online instructor and a student, acontractor and specialists, an online publisher and commenters, and thelike. The interactions may include text messages sent from one entity toanother, but are not limited to text messages. For instance,interactions may be through social media channels, telephonecommunications, online interactions, and the like. One skilled in theart will appreciate that the techniques described herein may be used ina broad scope of interaction environments.

FIG. 1 illustrates a system 100 for suggesting a resource to a customerservice representative in responding to a request of a customer. In FIG.1, a customer may use customer device 110 to communicate with a company.Customer device 110 may include any appropriate device, such as acomputer, smart phone, tablet, wearable device, or Internet of thingsdevice. The customer may submit the request using any appropriatetechniques, such as typing or speaking a request to an app running oncustomer device 110 (e.g., an app of a particular company or athird-party app created for processing customer requests), typing orspeaking a request on a web page, sending a text message, or sending anemail. As used herein, a text message includes any message sent as textincluding but not limited to a message sent using SMS (short messageservice) or a special purpose application (e.g., Facebook messenger,Apple iMessage, Google Hangouts, or WhatsApp). Other customers may alsointeract with system 100, such as another customer using customer device111.

The customer's request may be sent by customer device 110 to servers 130of the company via network 120. Network 120 may include any appropriatenetworks, such as a local area network, a wide area network, theInternet, Wi-Fi, or a cellular data network. The request may be sentusing any appropriate transmission protocols that include sending one ormore of the text of the message or audio of the customer speaking therequest. Where the customer speaks a request to customer device 110,speech recognition may be performed by customer device 110, at servers130, or by another component of system 100.

Servers 130 receive the customer request and may coordinate furtherprocessing of the customer request. Servers 130 may include componentscomprising particular functionality or may be connected to othercomputing devices that include such components. For example, servers 130may include support component 131 that facilitates a customer supportsession between a customer and a customer service representative (CSR).For example, support component 131 may select a CSR (e.g., CSR 150, 151,or 152), may transmit a message from a customer to a selected CSR, andmay transmit a response from a CSR back to the customer. A CSR may use auser interface, such as an application on a computer or a web page, toreceive customer requests and provide responses to them.

Servers 130 may include suggestion component 132 to suggest resources toa CSR in responding to a request of a customer. For example, suggestioncomponent 132 may process messages and other information (e.g., imagesor URLs) transmitted between customer 110 and the CSR to determine acontext of the session. A context of session may be any representationof a description of interactions between the customer and the CSR. Forexample, a context may be a vector computed using an artificial neuralnetwork that describes a meaning of the interactions. An interaction mayinclude any information or data transmitted between the customer and theCSR. For example, a message is an example of an interaction. Suggestioncomponent 132 may retrieve one or more resources from resources datastore 140 and present information about the resources to the CSR toassist the CSR in responding to the customer. The suggested resourcesmay include any information that may assist a CSR in responding to acustomer. For example, the resources may include a text response (suchas a text response used by the current CSR or another CSR in a previoussupport session similar to the current support session), an image, a URLto relevant information, a document, or a trouble shooting tree that maybe used by the CSR for diagnosing problems.

The suggested resources may be presented on a user interface (UI) usedby the CSR, such as the user interface of FIG. 2. The UI of FIG. 2includes different portions that contain different types of information.For example, FIG. 2 includes a customer list portion 210 that includes alist of customers who the CSR is currently communicating with. In thisexample, the CSR is communicating with five different customers, and thecustomer named Cathy Washington is a selected or active customer. FIG. 2also includes a conversation portion 220 that shows messages between thecustomer and the CSR.

FIG. 2 also includes a suggestions portion 230 that may presentsuggested resources to the CSR. In this example the suggested resourcesinclude three text responses 241-243, a URL 250, and a document 260. TheCSR may use any of the suggestions by selecting them or using any otherappropriate user interface techniques. For example, the CSR could clicksuggested response 241 to have it inserted into the text entry box ofconversation portion, and then send it to the customer. Similarly, theCSR may select URL 250 or document 260 to send them to the customer orto view them.

FIG. 3 is a flowchart of an example implementation of suggestingresources to a CSR. In FIG. 3, the ordering of the steps is exemplaryand other orders are possible, not all steps are required and, in someimplementations, some steps may be omitted or other steps may be added.The process of the flowcharts may be implemented, for example, by any ofthe computers or systems described herein.

At step 310, a support session between a customer and a CSR is started.The support session may be started using any appropriate techniques,such as by sending a text message (e.g., SMS), sending an email message,using an application or app (e.g., Facebook or a company specific app),or using a webpage. The session may be started by either the customer orthe CSR, and they may communicate via text, voice, or other means ofinteractive communication. A support session may comprise any number ofinteractions between the customer and the CSR.

At step 320, a message is received from either the customer or the CSRand transmitted to the other. For example, where the message is text,the text of messages between the customer and CSR may be presented inuser interfaces to the customer and the CSR. Where the message is audio,automatic speech recognition may be used to convert the audio to textfor subsequent processing.

At step 330, a context vector is computed that describes theinteractions in the support session, as described in greater detailbelow. For example, a context vector may be computed by iterativelyprocessing messages between the customer and the CSR. After receiving amessage from the customer or CSR, a previous context vector may beupdated using the message to generate a new context vector that accountsfor the received message. A context vector need not be in the form of avector and may take other formats, such as a matrix or tensor. A contextvector may include any data that describes the interactions so farbetween the customer and the CSR, such as a vector that indicates asemantic meaning of the interactions.

At step 340, suggestions of resources for the CSR are obtained from adata store of resources using the context vector. For example, resourcesmay be retrieved from the data store that have corresponding resourcevectors that are an exact match to the context vector or that are closeto the context vector (e.g., using a Euclidean or Hamming distance). Theresources in the data store may include any resources that may assistthe CSR. For example, the resources data store may include a largenumber of messages previously sent by CSRs to customers, and the contextvector may be used to receive one or more previous messages that may bean appropriate response for the CSR to send to the customer. Theresources in the resources data store may also include any of the otherresources described above, such as images, documents, or URLs.

At step 350, suggestions are presented to the CSR using the resourcesretrieved from the resources data store at step 340. For example, wherethe resources are previous messages, the text of the messages may bepresented to the CSR. Where the resources are images, a thumbnail of theimage may be presented along with a short description of the image. TheCSR may then use the suggestions in responding to the customer. In somesituations, the CSR may not use the suggestions at all and type or speaka response to the customer. In some situations, the CSR may click on asuggestion to send a response to the customer, such as by clicking asuggested message to send that same message to the customer.

At step 360, it is determined if the session is done. For example, thesession may be terminated by either the customer or the CSR. If thesession is not done, then processing proceeds to step 320 where anothermessage is received from the customer or the CSR. A new context vectormay then be computed using that message, resources may be retrieved froma data store using the new context vector, and suggestions may bepresented to the CSR using the retrieved resources. If the session isdone, then processing proceeds to step 370 where the support session isended. For example, a connection between the customer and CSR may beterminated so that messages are no longer communicated between them.

The context vector computed during the processing of FIG. 3 may becreated by processing the received message using one or moremathematical models, such as a neural network model. Mathematical modelsfor creating context vectors may be trained by using a corpus oftraining data. For example, a corpus of training data may include dataabout previous support sessions between customers and CSRs.

FIG. 4 illustrates an example of a previous support session between acustomer and a CSR that may be included as part of a training corpus fortraining models. In FIG. 4, time proceeds from the top to the bottom ofthe figure. The first column of the figure indicates messages sent bythe customer to the CSR, the second column indicates messages sent bythe CSR to the customer, and the third column indicates resources usedby the CSR during the support session (e.g., an image, document, orURL).

In the example of FIG. 4, the first action is a customer sending amessage to a CSR for assistance, such as “My Internet is not working.Can you help?” The second message is sent by the CSR to the customer,such as “Hi, my name is John, and I will be helping you today.”Similarly, subsequent messages may be sent between the customer and CSRas indicated by messages three through twelve. In this example, the CSRalso uses resources in responding to the customer. For example, whensending message 5 to the customer, the CSR may include an image toassist the customer in configuring his router. Similarly, when sendingmessage 10, the CSR may send a URL to the customer to allow the customerto check the speed of his network connection.

FIG. 5 illustrates a system 500 for training one or models forsuggesting resources that may be used by a CSR in a session with acustomer. In FIG. 5, training corpus data store 510 may includeinformation about previous sessions between customers and CSRs, such asthe session presented in FIG. 4. Training corpus data store 510 mayinclude a large number of sessions, such as tens of thousands orhundreds of thousands of sessions. In FIG. 5, resources data store 140may include any resources that may be suggested to a CSR. For example,resources data store may include some or all messages previously sent bya CSR to a customer (e.g., messages 2, 4, 5, 7, 10, and 12 from FIG. 4).

Model training component 520 may process training data from trainingcorpus 510 and resources from resources data store 140 to generate oneor more mathematical models, such as neural network models, forsuggesting resources to a CSR. Model training component 520 may alsogenerate resource vectors for the resources in the data store, whereeach resource vector describes the resource, such as by indicating acontext in which the resource was previously used. The one or moremodels and resource vectors may be used to select resources as describedin greater detail below.

FIG. 6 illustrates a system 600 for suggesting resources to a CSR usingthe one or models created by system 500 of FIG. 5. In FIG. 6, contextcomputation component 610 receives a message and generates a contextvector by processing the message with the one or more models, such asone or more neural network models. In some implementations, contextcomputation component 610 may iteratively process a sequence of messagesin a session and generate a context vector after processing eachmessage. For example, context computation component 610 may use acontext vector from a previous message in generating a context vectorfor a current message. Accordingly, each context vector may be computedusing a message and a previous context vector.

FIG. 6 includes search component 620 to search for resources using thecontext vector. In some implementations, search component 620 may queryresources data store 140 to obtain resources. For example, searchcomponent 620 may obtain resources that have resource vectors that matchthe context vector or are close to the context vector. Search component620 may output the retrieved resources, which may then be presented to aCSR.

FIGS. 7A and 7B illustrate additional details of an implementation ofthe system 500 of FIG. 5 for training models for suggesting resources.For example, systems 701 and 702 of FIGS. 7A and 7B may be part of modeltraining component 520 of system 500.

In FIG. 7A, system 701 may train the one or more models using trainingdata, such as the training data of training corpus 510. System 701 mayiteratively process pairs of inputs where the pairs of inputs maycomprise, for example, a message received from the customer and aresource used in response to the received message by the CSR in thetraining data. In one iteration, system 701 receives message 710 andresource used in response 720, where resource used in response 720 wasused in response to message 710 in the training data. For example,message 710 may be message 1 of FIG. 4 and resource used in response 720may be message 2 of FIG. 4.

System 701 may process these two inputs and update model parameters,such as model parameters used by session context component 730 andresource encoding component 740. The solid lines in FIG. 7A illustratedata flows for processing training data to determine updated modelparameters, and the dashed lines in FIG. 7A illustrate data flows forupdating the model parameters in the components of system 701. Forexample, optimization component 750 may compute updated model parametersand transmit the updated model parameters to other components.

Session context component 730 may process an interaction, such as any ofthe interactions of FIG. 4, and generate a context vector that describesthe session between the customer and the CSR from the beginning of thesession through the most recently processed interaction. The contextvector may, for example, indicate (not necessarily in a humanunderstandable way) a meaning of the interactions in the session. Anyappropriate techniques may be used to compute a context vector, such asany of the techniques described in greater detail below.

Resource encoding component 740 may process the resource that wasactually used in response to the message in the training data. Resourceencoding component 740 may generate a resource vector that describes theresource (not necessarily in a human understandable way), for example bydescribing contexts where the resource was previously used by a CSR. Anyappropriate techniques may be used to compute a resource vector, such asany of the techniques described in greater detail below.

Optimization component 750 receives the context vector from sessioncontext component 730 and the resource vector from resource encodingcomponent 740. Optimization component 750 then determines updated modelparameters so that context vector is “closer” to the resource vector insome sense. Because the corresponding resource was actually used at thispoint of the training data, optimization component 750 determinesupdated model parameters to increase a similarity between the contextvector and the resource vector. The meaning of closeness and similaritywith regards to the context and resource vectors may correspond to anymathematical notion of similarity, such as a distance or measure.Because session context component 730 and resource encoding component740 are trained in parallel, the parameters of these components mayconverge in parallel so that that the context vector may be used toidentify resources (via resource vectors) that are relevant to thecurrent session.

Session context component 730 may iteratively process interactions in asession. For example, session context component 730 may iterativelyprocess some or all of the interactions of FIG. 4 and generate a contextvector at each iteration. The interactions processed by session contextcomponent 730 may depend on the implementation. In some implementations,session context component 730 may process only messages received fromthe customer (e.g., messages 1, 3, 6, 8, 9, and 11 of FIG. 4). In someimplementations, session context component 730 may process all messagesbetween the customer and the CSR. In some implementations, sessioncontext component 730 may process all interactions in the session,including for example, resources used by the CSR (e.g., resources 1 and2 of FIG. 4) and any other resources described herein.

An example of the process of system 701 is now given using the exampletraining data of FIG. 4. For a first iteration, message 710 may bemessage 1 of FIG. 4 and resource used in response 720 may be message 2of FIG. 4. Session context component 730 may compute a context vectorfor the session although at this point, the session is just message 1 ofFIG. 4. Resource encoding component 740 may compute a resource vector,and optimization component 750 may update model parameters.

For a second iteration, session context component 730 may update thecontext vector by processing message 2 of FIG. 4. During the seconditeration, a resource may not be processed since no resource was used atthat point in the session. Where no resource is processed, nooptimization may be performed as well. In some implementations, thesecond iteration may not be performed, such as when the context iscomputed using only messages from the customer.

For a third iteration, message 710 may be message 3 of FIG. 4 andresource used in response 720 may be message 4 of FIG. 4. Sessioncontext component 730 may again compute a context for the session andnow the context for the session may include messages 1-3 of FIG. 4. Aswith the first iteration, a resource vector may be computed, and modelparameters updated.

For a fourth iteration, message 710 may be message 4 of FIG. 4 andresource used in response 720 may be resource 1 of FIG. 4. Sessioncontext component 730 may again compute a context for the session andnow the context for the session may include messages 1-4 of FIG. 4. Asabove, a resource vector may be computed, and model parameters updated.

Subsequent iterations may process the remaining interactions of FIG. 4.After all the interactions of FIG. 4 have been processed, the contextvector may be reset to an initial state to prepare for processinganother session of training data.

As the model parameters are updated by optimization component 750, themodel parameters may be transmitted to session context component 730 andresource encoding component 740 for subsequent processing. In someimplementations, the model parameters may be transmitted to thecomponents each time they are updated or they may be transmitted afterprocessing is completed for an entire session of the training data orfor multiple sessions of the training data.

The processing described above may be completed for an entire corpus oftraining data. Each session in the training corpus may be processed oneor more times to train the one or more models used by session contextcomponent 730 and resource encoding component 740. When the training iscomplete, as determined by any suitable termination criteria, thetrained one or more models may be used for subsequent processing.

FIG. 7B illustrates an example system 702 for computing resource vectorsfor each resource in resources data store 140 using the one or moremodels trained by system 701 of FIG. 7A. In FIG. 7B, resource encodingcomponent 740 receives a resource and generates a resource vector forthat resource. A resource vector for a resource may be stored in a datastore, such as data store 140, in association with the resource tofacilitate retrieval of the corresponding resource.

The one or more models and resource vectors may then be used to suggestresources to a CSR. For example, context computation component 610 ofsystem 600 may use the one or models to generate a context vector for asession, and search component 620 may compare the context vector topreviously stored resource vectors to retrieve one or more resources assuggestions for a CSR.

FIGS. 8A, 8B, and 8C, illustrate additional details of an implementationof the systems of FIGS. 7A and 7B for training one or more models forsuggesting resources. The examples of FIGS. 8A, 8B, and 8C, are notlimiting and many variations of these examples are possible.

In FIG. 8A, system 801 may train the one or more models using trainingdata, such as the training data of FIG. 4. System 801 takes as inputmessage 805 (similar to message 710) and resource used in response 806(similar to resource used in response 720), where resource used inresponse 806 was used in response to message 805 in the training data.In addition, system 801 takes as input other resource 807, which may beany other resource, such as a randomly selected resource from resourcesdata store 140. Other resource 807 is used during optimization asdescribed in greater detail below.

In system 801, session context component 830 may compute a contextvector similar to the context vector computed by session contextcomponent 730. Similarly, optimization component 850 may updateparameters of the one or more models similar to the operations ofoptimization component 750. As with FIG. 7, the solid lines in FIG. 8Aillustrate data flows for processing training data to determine updatedmodel parameters, and the dashed lines in FIG. 8A illustrate data flowsfor updating the model parameters in the components of system 801. Othercomponents of system 801 perform additional processing that are nowdescribed.

Message feature extraction component 810 receives message 805 andextracts features from the message. Any appropriate features may beextracted. For example, message feature extraction component 810 maygenerate a feature vector, where the length of the feature vector is thesize of the vocabulary of known words (and possibly n-grams) and eachelement of the vector indicates a number of times the corresponding wordappeared in the message. In another example, feature extractioncomponent 810 may generate a feature matrix, where the number of rows(or columns) in the matrix is equal to the number of words in themessage and each row represents the corresponding word as a wordembedding (e.g., an N-dimensional vector of real numbers that representsthe corresponding word).

Message embedding component 820 receives the features from messagefeature extraction component 810 and outputs a semantic representationof the message, such as a message embedding. For example, a messageembedding may be a fixed-length vector that represents a meaning of themessage in an N-dimensional space. Any appropriate techniques may beused to generate the message embedding from the message features. Forexample, message embedding component 820 may include any unsupervisedembedding method (e.g., Word2Vec, GLoVe, SPPMI-SVD), a multi-layerperceptron, or another type of neural network (e.g., a deep averaging,convolution, recurrent, or recursive neural network). In someimplementations, message embedding component may receive TFIDF (termfrequency, inverse document frequency) features and use a multi-layerperceptron with rectified linear units.

Session context component 830 may receive the message embedding frommessage embedding component 820 and generate a context vector for thesession (e.g., a context vector for the current message and one or moreprevious messages in the session). Any appropriate techniques may beused to generate a context vector for the session. In someimplementations, a context vector may be computed using a neuralnetwork, such as a single-layer convolution neural network thatprocesses a linear combination of a fixed-size window of messages or arecurrent neural network (RNN) with long short-term memory units. Nowdescribed is an example RNN with long short-term memory units that maybe implemented by session context component 830.

Where system 801 is processing a sequence of messages in a session, letm_(t) represent a message in the session for t from 1 to s, where s isthe number of messages in the session so far. For each message, m_(t),let x_(t) represent the features for the message as computed by messagefeature extraction component 810, and let f(x_(t)) represent the messageembedding as computed by message embedding component 820. Let a be thelength of a vector representing the message embedding and d be thehidden vector size of the RNN.

In some implementation, session context component 830 may compute acontext vector as follows:

i_(t) = σ(U_(i)f(x_(t)) + V_(i)y_(t − 1))o_(t) = σ(U_(o)f(x_(t)) + V_(o)y_(t − 1))f_(t) = σ(U_(f)f(x_(t)) + V_(f)y_(t − 1))${\overset{\sim}{y}}_{t} = {\tanh\left( {{U_{y}{f\left( x_{t} \right)}} + {V_{y}t_{t - 1}}} \right)}$${\sigma(x)}_{i} = \frac{1}{1 + e^{- x_{i}}}$${\tanh(x)}_{i} = \frac{e^{x_{i}} - e^{- x_{i}}}{e^{x_{i}} + e^{- x_{i}}}$$c_{t} = {{i_{t} \odot {\overset{\sim}{y}}_{t}} + {f_{t} \odot c_{t - 1}}}$y_(t) = o_(t) ⊙ tanh (c_(t))where the U_(i), U_(o), U_(f), U_(y) are d by a matrices of parameters;the V_(i), V_(o), V_(f), V_(y) are d by d matrices of parameters; ⊙ isthe element-wise multiplication operator, y₀ is initialized as a zerovector; and c₀ is initialized as a zero vector. After computing theabove, the vector y_(t) is a context vector that indicates a context ofthe session after processing message m_(t).

Encoding component 840 receives the context vector from session contextcomponent 830 and outputs an encoded context vector. As explained ingreater detail below, the encoded context vector may be referred to asan approximate context hash vector and later processing may compute acontext hash vector from the approximate context hash vector.

In some implementations, encoding component 840 may perform adivide-and-encode operation so that the output has a smaller dimensionthan the input and that the output is an approximately binary vector(many of the elements of the output vector are close to 0 or 1). Forexample, where the context vector has length d, the encoded contextvector may have length k, where d is divisible by k. In someimplementations, the encoded context vector may be computed as

M_(t)[j] = τ(σ(w_(j)^(T)y_(t)^((j))))${\tau(s)} = \left\{ \begin{matrix}0 & {{{if}\mspace{14mu} s} < {0.5 - \epsilon}} \\s & {{{{if}\mspace{14mu} 0.5} - \epsilon} \leq s \leq {0.5 + \epsilon}} \\1 & {{{if}\mspace{14mu} s} > {0.5 + \epsilon}}\end{matrix} \right.$where M_(t)[j] indicates the j^(th) element of the vector M_(t) for jfrom 1 to k, w_(j) is a parameter vector of length d/k for j from 1 tok, the superscript (j) means the j^(th) slice of length d/k, and E is asmall positive number. The encoded context vector may be represented asM_(t). In some implementations, encoding component may be implementedusing a single layer perceptron with sigmoid units.

Optimization component 850 then receives the encoded context vector anduses it to update model parameters. Optimization component 850 may alsotake as inputs one or more encoded resource vectors, and optimizationcomponent is described in greater detail below following the descriptionof computation of the encoded resource vectors.

System 801 also receives as input resource used in response 806, whereresource used in response 806 is the resource that was actually used inresponse to message 805 in the training data. Resource used in response806 may be any type of resource described herein, such as a message by aCSR to respond to a customer message or an image used by a CSR inresponding to a customer.

Resource feature extraction component 815 receives resource used inresponse 806 and extracts features from the resource. Any appropriatefeatures may be extracted, and the type of features extracted may dependon a type of the resource. For example, a first type of features may beextracted where the resource is a message and a second type of featuresmay be extracted where the resource is an image. Where the resource is amessage, resource feature extraction component 815 may provide the samefunctionality as message feature extraction component 810. Where theresource is an image, resource feature extraction component 815 may, forexample, use pixel values as features or compute SIFT (scale-invariantfeature transform), SURF (speeded up robust features), or HOG (histogramof ordered gradients) features.

Resource embedding component 825 receives features from resourceextraction component 815 and outputs a semantic representation of theresource, such as resource embedding. For example, a resource embeddingmay be a fixed-length vector that represents a meaning of the resourcein an N-dimensional space. Any appropriate techniques may be used togenerate the resource embedding from the resource features, and the typeof embedding may depend on a type of the resource. Where the resource isa message, the functionality of resource embedding component 825 may(but need not be) the same as message embedding component. Where theresource is an image, resource embedding component 825 may, for example,embed the image by processing it with a convolution neural network.

Encoding component 841 may receive the resource embedding from resourceembedding component 825 and output an encoded resource vector. Encodingcomponent 841 may provide the same functionality as encoding component840. The encoded resource vector for the resource used in response 806may be represented as N_(t).

System 801 also receives as input other resource 807. Other resource 807may be any other resource in resources data store 140. For example,other resource 807 may be a randomly selected resource from resourcesdata store 140. In some implementations, a type of other resource 807may be the same type as resource used in response 806 (e.g., if resourceused in response 806 is an image, then other resource 807 may be arandomly selected image from resources data store 140). The use of otherresource 807 may improve the convergence of the algorithms implementedby optimization component 850.

Resource embedding component 826 may perform the same processing asresource embedding component 825 and encoding component 842 may performthe same processing as encoding component 841. Accordingly, encodingcomponent 842 may output an encoded resource vector for other resource807, which may be represented as Ñ_(t).

Accordingly, optimization component may receive encoded message vectorM_(t), encoded resource vector N_(t) for resource used in response 806,and encoded resource vector Ñ_(t) for other resource 807. Optimizationcomponent 850 may use the encoded context vector and encoded resourcevectors to update parameter values for any parameters in system 801,such as parameters used by message embedding component 820, resourceembedding component 825, session context component 830, and encodingcomponent 840.

In some implementations, optimization component 850 may update parametervalues by using stochastic gradient descent, for example by minimizing atriplet rank loss as a cost function. For example, the triplet rank losscost function may be represented asL=max(0,1+∥M _(t) −N _(t)∥₂ ² −∥M _(t) −Ñ _(t)∥₂ ²)

In some implementations, system 801 may receive as input additionalresources, such as a second other resource (not shown), where the secondother resource may be another randomly selected resource. An encodedresource vector may be computed for the second other resource, and thisadditional encoded resource vector may be used by optimization component850 in determining updated parameters.

As above with FIG. 7A, the updated parameters computed by optimizationcomponent 850 may be transmitted to other components of system 801. Forexample, updated parameters may be transmitted after each iteration,after processing an entire session from the training corpus, or afterprocessing multiple sessions from the training corpus.

After system 801 has completed the training process, additionalprocessing may be performed to improve the performance of a system forsuggesting resources. Above, the encoded context vector computed byencoding component 840 was referred to as an approximate context hashvector, and the encoded resource vector computed by encoding component841 was referred to as an approximate resource hash vector. To improvethe performance of a system for suggesting resources, a context hashvector may be computed from the approximate context hash vector and aresource hash vector may be computed from an approximate resource hashvector.

A hash vector may provide improved performance in searching forresources over an approximate hash vector. An approximate hash vectormay contain real numbers (although many may be close to 0 or 1 as notedabove) while a hash vector may contain only boolean values. Performing asearch with hash vectors may allow for a quicker search. A hash vector,as used herein, is not limited to storing values in a vector form, and ahash vector may include storing values as a matrix or tensor as thetechniques described herein are not limited to any precise arrangementof hash values.

FIGS. 8B and 8C illustrate exemplary systems for creating hash vectorsfrom approximate hash vectors.

FIG. 8B illustrates a system 802 for generating an approximate resourcehash vector for resources, such as each of the resources in resourcesdata store 140. In FIG. 8B, each of the components may have the sameimplementation as the corresponding components of FIG. 8A. For eachresource being processed, features may be computed by resource featureextraction component 815, a resource embedding may be computed byresource embedding component 825, and an approximate resource hashvector (also called an encoded resource vector) may be computed byencoding component 840. Accordingly, an approximate resource hash vectormay be computed for each resource.

FIG. 8C illustrates a system 803 for training a quantization model forcomputing hash vectors from approximate hash vectors. In FIG. 8C,quantization model training component 860 receives as input all of theapproximate resource hash vectors computed by system 802. Quantizationmodel training component 860 then generates a model that allowsapproximate hash vectors to be converted to hash vectors. For example, aquantization model may implement a rotation.

In some implementations, quantization model training component 860 maybe implemented as follows. A matrix

may be created where each row of the matrix

is an approximate resource hash vector. This matrix

may then be average-centered. An average row vector may be computed as

${\mu = {\frac{1}{n}{\sum\limits_{i = 1}^{n}\mathcal{N}_{i}}}},$where n is the number of rows and

_(i) is the i^(th) row of

. The matrix

may then be average-centered by subtracting the average row vector fromeach row of the matrix

.

The average-centered matrix

may then be used train a rotation matrix R for generating hash vectors.The rotation matrix may be initialized, such as by initializing it to arandom rotation. The rotation matrix may then be trained by sequentiallyperforming the following updates:B=sign(

R)U,S,V=SVD(B ^(T)

)R=VU ^(T)where signs( ) returns matrix of 1's and −1's according to the sign ofcorresponding elements of the input and SVD( ) performs a singular valuedecomposition of the input. This sequence of operations may be performeduntil a convergence criterion has been met. Each row of the final matrixB contains a resource hash vector for a corresponding resource and thefinal matrix B may have values of only 1 and −1. In someimplementations, the matrix B may be converted to a matrix of 1s and 0sby converting all the −1s to 0s or performing some other similaroperation. The quantization model comprises rotating a vector withrotation matrix R and then performing the sign( ) operation on theresulting vector.

FIGS. 9A and 9B illustrate systems for suggesting a resource to a CSRusing hash vectors. At the beginning of a session with a CSR a firstmessage is received. The first message may be from either the customeror the CSR. The received message is processed to compute a context hashvector, and then the context hash vector is used to retrieve resourcesfrom resources data store 140.

In system 901 of FIG. 9A, message feature extraction component 810computes features for the message, message embedding component 820computes a message embedding from the features, session context 830computes a context vector for the session (which may include only thefirst message at this point), encoding component 840 computes anapproximate context hash vector, and quantization component 910 computesa context hash vector. Quantization component 910 may receive theapproximate context hash vector (which may have real values) and mayperform a rotation and then compute the sign( ) of the rotated vector togenerate the context hash vector (which may have values of only 1 and−1). In some implementations, the context hash vector may be convertedto a vector of 1s and 0s similar to the processing of the resource hashvectors above.

In system 902, the context hash vector is used to obtain resources tosuggest to a CSR. Search component 920 receives a context hash vectorand retrieves resources from resources data store 140 by comparing thecontext hash vector to resource hash vectors in the data store.

In some implementations, search component 920 may retrieve all resourceswhere the resource hash vector of the resource is equal to the contexthash vector by performing a query using the context hash vector.

In some implementations, search component 920 may retrieve all resourceswhere the resource hash vector of the resource is within a Hammingradius of the context hash vector. A Hamming radius of a hash vector maycomprise all other vectors where the number of different elements isless than or equal to a specified value. A Hamming radius of 1 for acontext hash vector would include a resource hash vector that isidentical to the context hash vector and all resource hash vectors whoseelements are the same as the context hash vector for all but oneelement. For example, for a context hash vector of [1, 0, 1, 0],resource hash vectors within a Hamming distance of 1 would include [1,0, 1, 0]; [0, 0, 1, 0]; [1, 1, 1, 0]; [1, 0, 0, 0]; and [1, 0, 1, 1].Search component 920 may determine all resource hash vectors within aHamming radius of the context hash vector and retrieve correspondingresources from resources data store 140.

In some implementations, search component 920 may implement an invertedindex to speed up retrieval of resources using a context hash vector. Aninverted index may include a list of resources corresponding to eachpossible resource hash vector, and allow for fast retrieval of resourcesfrom resources data store 140.

In some implementations, system 902 may include post-processingcomponent 930. Post-processing component 930 may receive a list ofresources from search component 920 and perform additional processing todetermine which resources to present to a CSR. Post-processing component930 may rerank the resources received from search component 920 or mayselect no resources so that no suggestions are presented to a CSR. Insome implementations, post-processing component 930 may use atranslation language model that was trained to translate betweenmessages and resources used in response to messages; may apply anystatistical machine translation techniques that indicate a match betweena message and a resource, may use a ranking support vector machine thatprocesses TFIDF features of a previous message, or may use any otherknown reranking techniques.

The resource suggestions may then be presented to a CSR, such as bypresenting information about the suggested resources in a userinterface, such as the user interface of FIG. 2. The CSR may then usethe suggested resources in a conversation with the customer. Forexample, where the suggested resource is a message, the CSR may sendthat message to the customer or may modify it and then send it to thecustomer.

FIG. 10 is a flowchart of an example implementation of training one ormore models for computing hash vectors for suggesting resources. In FIG.10, the ordering of the steps is exemplary and other orders arepossible, not all steps are required and, in some implementations, somesteps may be omitted or other steps may be added. The process of theflowcharts may be implemented, for example, by any of the computers orsystems described herein.

At step 1010, a message sequence is obtained from a training corpus,such as the message sequence of FIG. 4 or a portion of the messagesequence of FIG. 4. The message sequence may include any number ofmessages between a customer and a CSR. The message sequence may alsoinclude other information, such as other resources used by a CSR duringthe session between the customer and the CSR. For example, the messagesequence may be messages 1-3 of FIG. 4.

At step 1020, an approximate context hash vector is computed for themessage sequence. The approximate context hash vector may be computedusing any of the techniques described above. For example, an approximatecontext hash vector may be computed iteratively for each message in thesequence, where each approximate context hash vector is computed usingthe approximate context hash vector from the previous iteration.Computing the approximate context hash vector may also includeprocessing other resources used by a CSR, such as when the CSR uses animage in responding to the customer. In some implementations, anapproximate context hash vector may be computed by message featureextraction component 810, message embedding component 820, sessioncontext component 830, and encoding component 840.

At step 1030, a response of the CSR to the last message in the messagesequence is obtained from the training data. For example, the responseof the CSR may be message 4 of FIG. 4.

At step 1040, an approximate resource hash vector is computed for theresponse. The approximate resource hash vector may be computed using anyof the techniques described above. In some implementations, anapproximate resource hash vector for the response may be computed byresource feature extraction component 815, resource embedding component825, and encoding component 841.

At step 1050, a different resource is obtained that is different fromthe response of the CSR to customer at step 1040. For example, aresource may be selected randomly from resources data store 140.

At step 1060, an approximate resource hash vector is computed for thedifferent resource obtained at step 1050. The approximate resource hashvector for the different resource may be computed using any of thetechniques described above. In some implementations, approximateresource hash vector for the different resource may be computed byresource feature extraction component 816, resource embedding component826, and encoding component 842.

In some implementations, multiple different resources may be used asdescribed above. Accordingly, steps 1050 and 1060 may be performed foreach different resource that is used.

At step 1070, model parameters are updated using the approximate contexthash vector, the approximate resource hash vector for the response ofthe CSR, and one or more approximate resource hash vectors for thedifferent resources. The model parameters may be updated using any ofthe techniques described herein.

At step 1080, it is determined whether the training process hascompleted. Any appropriate criteria may be used to determined when thetraining process has completed. For example, where the model parametershave converged to stable values (e.g., the differences with a previousiteration are small), it may be determined that the training hascompleted. Where training has not completed, processing may return tostep 1010 to, for example, obtain and process the following message in amessage sequence.

At step 1090, training is completed and the trained one or more modelsmay be further processed (e.g., compute approximate resource hashvectors, train a quantization model, and compute resource hash vectors)and used for suggesting resources.

FIG. 11 is a flowchart of an example implementation of suggestingresources using hash vectors. In FIG. 11, the ordering of the steps isexemplary and other orders are possible, not all steps are required and,in some implementations, some steps may be omitted or other steps may beadded. The process of the flowcharts may be implemented, for example, byany of the computers or systems described herein.

At step 1110, a message is received from either a customer or a CSR. Forexample, the message may be sent from a customer to the CSR or from theCSR to the customer. The message may be the first message between themor it may follow other messages between them.

At step 1120, a semantic representation is computed from the message.The semantic representation may be any representation of the messagethat indicates a meaning of the message, although the semanticrepresentation may not be understandable by a person. The semanticrepresentation may be a vector of real numbers or may take another form,such as a matrix or a tensor. In some implementations, the semanticrepresentation may be a message embedding computed by message featureextraction component 810 and message embedding component 820.

At step 1130, a context vector is computed for the session using thesemantic representation of the message. The context vector may be anyrepresentation of the session that indicates a meaning of the session(for example, the meaning of the session may include a meaning of thecurrent message and a meaning of previous messages in the session). Thecontext vector may be computed using a context vector from a previousiteration that processed a previous message in the session. The contextvector may be a vector of real numbers or may be in another format, suchas a matrix or a tensor (the term context vector is used for clarity ofpresentation but a context matrix or context tensor may be computedinstead). In some implementations, the context vector may be computedusing session context component 830.

At step 1140, a context hash vector is computed for the session. Thecontext hash vector may be any hash vector that indicates a meaning ofthe session (for example, the meaning of the session may include ameaning of the current message and a meaning of previous messages in thesession). The context hash vector may be a vector where each element ofthe vector takes one of two values, such as 0 or 1. In someimplementations, a context hash matrix or a context hash tensor may becomputed instead of a context hash vector. In some implementations, thecontext hash vector may be computed using encoding component 840 andquantization component 910.

At step 1150, one or more resources are obtained using the context hashvector. For example, one or more resources may be retrieved from a datastore of resources where a resource hash vector of a resource matches oris close to the context hash vector. In some implementations, resourcesmay be obtained where the resource hash vectors are within a Hammingdistance of the context hash vector. In some implementations, the one ormore resources may be obtained by search component 920.

At step 1160, post-processing may be performed on the obtained resourcesas described above. In some implementations, the post-processing may beperformed by post-processing component 930.

At step 1170, one or more resources are caused to be presented to theCSR. For example, the one or more resources may be presented to the CSRusing the user interface of FIG. 2. The CSR may then use the resource inresponding to the customer as described above.

FIG. 12 illustrates components of one implementation of a computingdevice 1200 for implementing any of the techniques described above. InFIG. 12, the components are shown as being on a single computing device1200, but the components may be distributed among multiple computingdevices, such as a system of computing devices, including, for example,an end-user computing device (e.g., a smart phone or a tablet) and/or aserver computing device (e.g., cloud computing).

Computing device 1200 may include any components typical of a computingdevice, such as volatile or nonvolatile memory 1210, one or moreprocessors 1211, and one or more network interfaces 1212. Computingdevice 1200 may also include any input and output components, such asdisplays, keyboards, and touch screens. Computing device 1200 may alsoinclude a variety of components or modules providing specificfunctionality, and these components or modules may be implemented insoftware, hardware, or a combination thereof. Below, several examples ofcomponents are described for one example implementation, and otherimplementations may include additional components or exclude some of thecomponents described below.

Computing device 1200 may have a support component 1220 that providesfunctionality for allowing a customer and a CSR to interact with eachother in a support session, such as presenting user interfaces to acustomer or CSR, allowing messages to be transmitted between thecustomer and the CSR, or presenting suggestions to a CSR. Computingdevice 1200 may have a suggestion component 1230 that may identifyresources as possible suggestions for a CSR, such as by processing amessage transmitted between a customer and a CSR, computing a contextfor the session, and retrieving resources from a data store using thecomputed context. Computing device 1200 may have a model trainingcomponent 1240 that train mathematical models, such as artificial neuralnetworks, for suggesting resources based on a context of a session.

Computing device 1200 may include or have access to various data stores,such as data stores 140 and 510. Data stores may use any known storagetechnology, such as files or relational or non-relational databases. Forexample, computing device 1200 may have a resources data store 140 and atraining corpus data store 510, as described above.

For clarity of presentation, the techniques described above have beenpresented in the context of a session between a customer and a CSR wherethe customer and CSR are exchanging messages with each other. Thetechniques described above, however, are not limited to that particularexample, and other applications are possible.

The techniques described above may be applied to any two entitiesexchanging messages with each other. For example, two individuals may beexchanging messages with each other, resources may be suggested toeither user, and the suggested resources may include a message to sendin response or something else, such as a URL to a website withinformation relevant to the conversation.

The techniques described above may be applied to interactions other thanmessages. For example, the interactions between two entities may be inthe form of audio and/or video and resources may be suggested to theentities by processing the audio and/or video to determine a context ofthe session and suggest resources to the entities.

The techniques described above may be applied to interactions thatproceed in non-linear ways, such as a directed acyclic graph (incomparison to linear, sequential exchanges in a messaging session). Forinteractions that proceed as a directed acyclic graph, a recursiveneural network (e.g., with long short-term memory units) may be usedthat is adapted to process nodes of a directed acyclic graph.

The techniques described above may be combined with any of thetechniques described in U.S. patent application Ser. No. 15/254,008filed on Sep. 1, 2016, now issued as U.S. Pat. No. 9,715,496 on Jul. 25,2017, and U.S. patent application Ser. No. 15/383,707, filed on Dec. 19,2016 and entitled “Word Hash Language Model”, each of which is hereinincorporated by reference in its entirety for all purposes. For example,any of the techniques described herein may be provided as part of athird-party semantic processing service whereby a third party providessemantic processing services to a company to assist the company inproviding customer service to its customers.

The methods and systems described herein may be deployed in part or inwhole through a machine that executes computer software, program codes,and/or instructions on a processor. “Processor” as used herein is meantto include at least one processor and unless context clearly indicatesotherwise, the plural and the singular should be understood to beinterchangeable. The present invention may be implemented as a method onthe machine, as a system or apparatus as part of or in relation to themachine, or as a computer program product embodied in a computerreadable medium executing on one or more of the machines. The processormay be part of a server, client, network infrastructure, mobilecomputing platform, stationary computing platform, or other computingplatform. A processor may be any kind of computational or processingdevice capable of executing program instructions, codes, binaryinstructions and the like. The processor may be or include a signalprocessor, digital processor, embedded processor, microprocessor or anyvariant such as a co-processor (math co-processor, graphic co-processor,communication co-processor and the like) and the like that may directlyor indirectly facilitate execution of program code or programinstructions stored thereon. In addition, the processor may enableexecution of multiple programs, threads, and codes. The threads may beexecuted simultaneously to enhance the performance of the processor andto facilitate simultaneous operations of the application. By way ofimplementation, methods, program codes, program instructions and thelike described herein may be implemented in one or more thread. Thethread may spawn other threads that may have assigned prioritiesassociated with them; the processor may execute these threads based onpriority or any other order based on instructions provided in theprogram code. The processor may include memory that stores methods,codes, instructions and programs as described herein and elsewhere. Theprocessor may access a storage medium through an interface that maystore methods, codes, and instructions as described herein andelsewhere. The storage medium associated with the processor for storingmethods, programs, codes, program instructions or other type ofinstructions capable of being executed by the computing or processingdevice may include but may not be limited to one or more of a CD-ROM,DVD, memory, hard disk, flash drive, RAM, ROM, cache and the like.

A processor may include one or more cores that may enhance speed andperformance of a multiprocessor. In embodiments, the process may be adual core processor, quad core processors, other chip-levelmultiprocessor and the like that combine two or more independent cores(called a die).

The methods and systems described herein may be deployed in part or inwhole through a machine that executes computer software on a server,client, firewall, gateway, hub, router, or other such computer and/ornetworking hardware. The software program may be associated with aserver that may include a file server, print server, domain server,internet server, intranet server and other variants such as secondaryserver, host server, distributed server and the like. The server mayinclude one or more of memories, processors, computer readable media,storage media, ports (physical and virtual), communication devices, andinterfaces capable of accessing other servers, clients, machines, anddevices through a wired or a wireless medium, and the like. The methods,programs, or codes as described herein and elsewhere may be executed bythe server. In addition, other devices required for execution of methodsas described in this application may be considered as a part of theinfrastructure associated with the server.

The server may provide an interface to other devices including, withoutlimitation, clients, other servers, printers, database servers, printservers, file servers, communication servers, distributed servers andthe like. Additionally, this coupling and/or connection may facilitateremote execution of program across the network. The networking of someor all of these devices may facilitate parallel processing of a programor method at one or more location without deviating from the scope ofthe invention. In addition, any of the devices attached to the serverthrough an interface may include at least one storage medium capable ofstoring methods, programs, code and/or instructions. A centralrepository may provide program instructions to be executed on differentdevices. In this implementation, the remote repository may act as astorage medium for program code, instructions, and programs.

The software program may be associated with a client that may include afile client, print client, domain client, internet client, intranetclient and other variants such as secondary client, host client,distributed client and the like. The client may include one or more ofmemories, processors, computer readable media, storage media, ports(physical and virtual), communication devices, and interfaces capable ofaccessing other clients, servers, machines, and devices through a wiredor a wireless medium, and the like. The methods, programs, or codes asdescribed herein and elsewhere may be executed by the client. Inaddition, other devices required for execution of methods as describedin this application may be considered as a part of the infrastructureassociated with the client.

The client may provide an interface to other devices including, withoutlimitation, servers, other clients, printers, database servers, printservers, file servers, communication servers, distributed servers andthe like. Additionally, this coupling and/or connection may facilitateremote execution of program across the network. The networking of someor all of these devices may facilitate parallel processing of a programor method at one or more location without deviating from the scope ofthe invention. In addition, any of the devices attached to the clientthrough an interface may include at least one storage medium capable ofstoring methods, programs, applications, code and/or instructions. Acentral repository may provide program instructions to be executed ondifferent devices. In this implementation, the remote repository may actas a storage medium for program code, instructions, and programs.

The methods and systems described herein may be deployed in part or inwhole through network infrastructures. The network infrastructure mayinclude elements such as computing devices, servers, routers, hubs,firewalls, clients, personal computers, communication devices, routingdevices and other active and passive devices, modules and/or componentsas known in the art. The computing and/or non-computing device(s)associated with the network infrastructure may include, apart from othercomponents, a storage medium such as flash memory, buffer, stack, RAM,ROM and the like. The processes, methods, program codes, instructionsdescribed herein and elsewhere may be executed by one or more of thenetwork infrastructural elements.

The methods, program codes, and instructions described herein andelsewhere may be implemented on a cellular network having multiplecells. The cellular network may either be frequency division multipleaccess (FDMA) network or code division multiple access (CDMA) network.The cellular network may include mobile devices, cell sites, basestations, repeaters, antennas, towers, and the like. The cell networkmay be a GSM, GPRS, 3G, EVDO, mesh, or other networks types.

The methods, programs codes, and instructions described herein andelsewhere may be implemented on or through mobile devices. The mobiledevices may include navigation devices, cell phones, mobile phones,mobile personal digital assistants, laptops, palmtops, netbooks, pagers,electronic books readers, music players and the like. These devices mayinclude, apart from other components, a storage medium such as a flashmemory, buffer, RAM, ROM and one or more computing devices. Thecomputing devices associated with mobile devices may be enabled toexecute program codes, methods, and instructions stored thereon.Alternatively, the mobile devices may be configured to executeinstructions in collaboration with other devices. The mobile devices maycommunicate with base stations interfaced with servers and configured toexecute program codes. The mobile devices may communicate on apeer-to-peer network, mesh network, or other communications network. Theprogram code may be stored on the storage medium associated with theserver and executed by a computing device embedded within the server.The base station may include a computing device and a storage medium.The storage device may store program codes and instructions executed bythe computing devices associated with the base station.

The computer software, program codes, and/or instructions may be storedand/or accessed on machine readable media that may include: computercomponents, devices, and recording media that retain digital data usedfor computing for some interval of time; semiconductor storage known asrandom access memory (RAM); mass storage typically for more permanentstorage, such as optical discs, forms of magnetic storage like harddisks, tapes, drums, cards and other types; processor registers, cachememory, volatile memory, non-volatile memory; optical storage such asCD, DVD; removable media such as flash memory (e.g. USB sticks or keys),floppy disks, magnetic tape, paper tape, punch cards, standalone RAMdisks, Zip drives, removable mass storage, off-line, and the like; othercomputer memory such as dynamic memory, static memory, read/writestorage, mutable storage, read only, random access, sequential access,location addressable, file addressable, content addressable, networkattached storage, storage area network, bar codes, magnetic ink, and thelike.

The methods and systems described herein may transform physical and/oror intangible items from one state to another. The methods and systemsdescribed herein may also transform data representing physical and/orintangible items from one state to another.

The elements described and depicted herein, including in flow charts andblock diagrams throughout the figures, imply logical boundaries betweenthe elements. However, according to software or hardware engineeringpractices, the depicted elements and the functions thereof may beimplemented on machines through computer executable media having aprocessor capable of executing program instructions stored thereon as amonolithic software structure, as standalone software modules, or asmodules that employ external routines, code, services, and so forth, orany combination of these, and all such implementations may be within thescope of the present disclosure. Examples of such machines may include,but may not be limited to, personal digital assistants, laptops,personal computers, mobile phones, other handheld computing devices,medical equipment, wired or wireless communication devices, transducers,chips, calculators, satellites, tablet PCs, electronic books, gadgets,electronic devices, devices having artificial intelligence, computingdevices, networking equipments, servers, routers and the like.Furthermore, the elements depicted in the flow chart and block diagramsor any other logical component may be implemented on a machine capableof executing program instructions. Thus, while the foregoing drawingsand descriptions set forth functional aspects of the disclosed systems,no particular arrangement of software for implementing these functionalaspects should be inferred from these descriptions unless explicitlystated or otherwise clear from the context. Similarly, it will beappreciated that the various steps identified and described above may bevaried, and that the order of steps may be adapted to particularapplications of the techniques disclosed herein. All such variations andmodifications are intended to fall within the scope of this disclosure.As such, the depiction and/or description of an order for various stepsshould not be understood to require a particular order of execution forthose steps, unless required by a particular application, or explicitlystated or otherwise clear from the context.

The methods and/or processes described above, and steps thereof, may berealized in hardware, software or any combination of hardware andsoftware suitable for a particular application. The hardware may includea general-purpose computer and/or dedicated computing device or specificcomputing device or particular aspect or component of a specificcomputing device. The processes may be realized in one or moremicroprocessors, microcontrollers, embedded microcontrollers,programmable digital signal processors or other programmable device,along with internal and/or external memory. The processes may also, orinstead, be embodied in an application specific integrated circuit, aprogrammable gate array, programmable array logic, or any other deviceor combination of devices that may be configured to process electronicsignals. It will further be appreciated that one or more of theprocesses may be realized as a computer executable code capable of beingexecuted on a machine-readable medium.

The computer executable code may be created using a structuredprogramming language such as C, an object oriented programming languagesuch as C++, or any other high-level or low-level programming language(including assembly languages, hardware description languages, anddatabase programming languages and technologies) that may be stored,compiled or interpreted to run on one of the above devices, as well asheterogeneous combinations of processors, processor architectures, orcombinations of different hardware and software, or any other machinecapable of executing program instructions.

Thus, in one aspect, each method described above and combinationsthereof may be embodied in computer executable code that, when executingon one or more computing devices, performs the steps thereof. In anotheraspect, the methods may be embodied in systems that perform the stepsthereof, and may be distributed across devices in a number of ways, orall of the functionality may be integrated into a dedicated, standalonedevice or other hardware. In another aspect, the means for performingthe steps associated with the processes described above may include anyof the hardware and/or software described above. All such permutationsand combinations are intended to fall within the scope of the presentdisclosure.

While the invention has been disclosed in connection with the preferredembodiments shown and described in detail, various modifications andimprovements thereon will become readily apparent to those skilled inthe art. Accordingly, the spirit and scope of the present invention isnot to be limited by the foregoing examples, but is to be understood inthe broadest sense allowable by law.

All documents referenced herein are hereby incorporated by reference.

What is claimed is:
 1. A computer-implemented method for presentinginformation about a resource to a user, the method performed by one ormore server computers and comprising: receiving a plurality ofelectronic messages during a session between a first computing device ofa first user and a second computing device of a second user; computing amessage embedding for each message of the plurality of electronicmessages with a first neural network, wherein each message embeddingrepresents a corresponding message in a vector space; computing a firstcontext vector by sequentially processing the message embeddings for theplurality of electronic messages, wherein the processing is performedusing a second neural network; quantizing the first context vector toobtain a first context hash vector; selecting a first resource from adata store using the first context hash vector and a hash vector for thefirst resource, wherein (i) the data store comprises a plurality ofresources, (ii) each resource of the plurality of resources isassociated with a hash vector, (iii) selecting the first resourcecomprises computing a distance between the first context hash vector andthe hash vector for the first resource; and transmitting, during thesession, information about the first resource to the first computingdevice to allow the first user to access the first resource.
 2. Thecomputer-implemented method of claim 1, wherein the first user is acustomer service representative and the second user is a customer. 3.The computer-implemented method of claim 1, wherein the method furthercomprises: receiving a subsequent message between the first user and thesecond user; computing a subsequent message embedding for the subsequentmessage; computing a second context vector using the first contextvector and the subsequent message embedding of the subsequent message;quantizing the second context vector to obtain a second context hashvector; selecting a second resource from the data store using the secondcontext hash vector and a hash vector for the second resource; andtransmitting, during the session, information about the second resourceto the first computing device.
 4. The computer-implemented method ofclaim 1, wherein the second neural network is a recurrent neural networkor a convolution neural network.
 5. The computer-implemented method ofclaim 1, wherein each element of the first context hash vector comprisesa boolean value.
 6. The computer-implemented method of claim 1, whereinthe first resource comprises text of a message, a document, an image, ora URL.
 7. The computer-implemented method of claim 1, wherein the firstcontext hash vector is equal to the hash vector for the first resource.8. The computer-implemented method of claim 1, wherein the distance is aHamming distance.
 9. A system for presenting information about aresource to a user, the system comprising: at least one server computercomprising at least one processor and at least one memory, the at leastone server computer configured to: receive, a plurality of electronicmessages during a session between a first computing device of a firstuser and a second computing device of a second user; compute, a semanticrepresentation of each message of the plurality of electronic messages;compute, a first context vector by processing the semanticrepresentations for the plurality of electronic messages; quantize, thefirst context vector to obtain a first context hash vector; select afirst resource from a data store using the first context hash vector anda hash vector for the first resource, wherein the data store comprises aplurality of resources and each resource of the plurality of resourcesis associated with a hash vector; and transmit, during the session,information about the first resource to the first computing device. 10.The system of claim 9, wherein the at least one server computer isconfigured to: receive a selection of the first resource by the firstuser; and cause the first resource to be transmitted to the second user.11. The system of claim 9, wherein the semantic representation comprisesa message embedding.
 12. The system of claim 9, wherein the at least oneserver computer is configured to compute the first context vector usinga recurrent neural network with long short-term memory units.
 13. Thesystem of claim 9, wherein the at least one server computer isconfigured to select the first resource using an inverted index.
 14. Thesystem of claim 9, wherein the at least one server computer isconfigured to quantize the first context vector by performing a rotationof the first context vector.
 15. The system of claim 9, wherein thefirst context vector is computed using a neural network and the neuralnetwork is trained by minimizing a triplet rank loss function.
 16. Oneor more non-transitory computer-readable media comprising computerexecutable instructions that, when executed, cause at least oneprocessor to perform actions comprising: receiving a plurality ofelectronic messages during a session between a first computing device ofa first user and a second computing device of a second user; computing asemantic representation of each message of the plurality of electronicmessages; computing a context vector by processing the semanticrepresentations for the plurality of electronic messages; quantizing thecontext vector to obtain a context hash vector; selecting a firstresource from a data store using the context hash vector and a hashvector for the first resource, wherein the data store comprises aplurality of resources and each resource of the plurality of resourcesis associated with a hash vector; and transmitting, during the session,information about the first resource to the first computing device. 17.The one or more non-transitory computer-readable media of claim 16,wherein each element of the context hash vector comprises a booleanvalue.
 18. The one or more non-transitory computer-readable media ofclaim 16, wherein selecting the first resource from the data storecomprises computing a Hamming distance between the context hash vectorand the hash vector for the first resource.
 19. The one or morenon-transitory computer-readable media of claim 16, wherein the semanticrepresentation comprises a message embedding.
 20. The one or morenon-transitory computer-readable media of claim 16, wherein selectingthe first resource comprises using an inverted index.